package cc.autoapi.pucong.auto.flow.core.flow.execNode.streamBus;

/**
 * 发布者
 */
public class StreamPublisher implements IStreamPublisher {

    private IStreamSubscriber subscriber;

    public StreamPublisher() {
        this.subscriber = new MsgStreamSubscriber();
    }


    @Override
    public void send(String msg) {
        subscriber.update(msg);
    }

    @Override
    public void complete() {
        subscriber.runComplete();
    }

    public IStreamSubscriber getSubscriber() {
        return subscriber;
    }
}